Communication apparatus and method of constructing network thereby

ABSTRACT

When a connection is made to a wireless network constructed by a base station, a request to construct a wireless network in which a wireless communication apparatus operates as a base station is sensed and a determination is made as to whether communication is in progress with a communication apparatus of a network different from the wireless network constructed by the base station. If the request to construct the wireless network is sensed and it is determined that communication is in progress with a communication apparatus of a network different from the wireless network in which the base station is the intermediary, then an attempt is made to construct a wireless network in which the wireless communication apparatus operates as a base station.

TECHNICAL FIELD

The present invention relates to a communication apparatus capable ofoperating as a base station and to a method of constructing a network bythis communication apparatus.

BACKGROUND ART

Systems in which communication is performed using a wireless LANcompliant with IEEE 802.11 have proliferated in recent years.Communication apparatuses that communicate by wireless LAN areclassified into stations that operate as terminal stations and accesspoints that serve as base stations. Communication by wireless LAN cantake on two forms, namely an infrastructure mode in which a stationperforms communication via an access point, and an ad-hoc mode in whichstations communicate with one another directly without the intermediaryof an access point. Furthermore, a WDS (Wireless Distribution System) isalso available as a mode used in communication among access points.

Furthermore, in a technique that has been proposed, a wirelesscommunication apparatus has a function (an STA mode) in which itoperates as a station and a function (AP mode) in which it operates asan access point, with operation being switched between these modesdepending upon application and conditions.

In another proposed technique, a wireless communication apparatus (adual terminal) capable of operating in both the STA and AP modestransitions to the AP mode automatically in accordance with thesurrounding circumstances and constructs a communication networkautomatically (e.g., see the specification of Japanese Patent Laid-OpenNo. 08-298687).

However, in an environment in which a plurality of dual terminals exist,there is the danger that bandwidth will be wasted when one dual terminalconstructs a new network in the AP mode. In other words, when it isconsidered that data communication with the already existing network isto be allowed to continue, it is necessary that the dual terminal in theAP mode be selected appropriately. For example, consider a networksystem composed of an access point 105, a wireless communicationapparatus 101 and a wireless communication apparatus 103, which are dualterminals, and a wired terminal 107, as illustrated in FIG. 1.

The access point 105 and wired terminal 107 are connected by a wired LAN108, as shown in FIG. 1. The wireless communication apparatus 101 isconnected to the access point 105 in the STA mode and performs datacommunication with the wired terminal 107. The wireless communicationapparatus 103 is connected to the access point 105 in the STA mode. Nowassume that when communication between the wireless communicationapparatus 101 and wireless communication apparatus 103 starts, abandwidth inadequacy occurs, by way of example.

In this case, it can be construed that either the wireless communicationapparatus 101 or wireless communication apparatus 103 will shift to theAP mode and construct a new network, whereby communication bandwidthbetween the wireless communication apparatus 101 and wirelesscommunication apparatus 103 will be assured.

However, in a case where the wireless communication apparatus 101 wishesto continue communicating with the wired terminal 107, continuation ofcommunication between the wireless communication apparatus 101 and wiredterminal 107 will not be assured if the wireless communication apparatus103 constructs a network anew in the AP mode, as illustrated in FIG. 16.

Further, because it becomes necessary to carry out transfers to thewireless communication apparatus 101 via the wireless communicationapparatus 103, there is an increase in the number of communication pathsfrom the wireless communication apparatus 103 to the wirelesscommunication apparatus 101 and wasting of wireless communicationbandwidth occurs.

DISCLOSURE OF INVENTION

The present invention seeks to construct a new network without wastingcommunication bandwidth.

In accordance with an aspect of the present invention, there is provideda communication apparatus comprising: determination means fordetermining whether communication is in progress with anothercommunication apparatus of another network different from a networkconstructed by a base station; and construction means for operating as abase station and trying to construct a new network in a case where a newnetwork is constructed during communication with the other communicationapparatus via the base station.

In accordance with an aspect of the present invention, there is provideda method of constructing a network by a communication apparatus,comprising: a determination step of determining whether communication isin progress with another communication apparatus of another networkdifferent from a network constructed by a base station; and aconstruction step of operating as a base station and trying to constructa new network in a case where a new network is constructed duringcommunication with the other communication apparatus via the basestation.

Further features of the present invention will become apparent from thefollowing description of exemplary embodiments with reference to theattached drawings.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a diagram illustrating an example of the configuration of anetwork system according to a first embodiment of the present invention;

FIG. 2 is a diagram illustrating an example of the configuration of awireless communication apparatus;

FIG. 3 is a diagram illustrating an example of the configuration of anaccess point;

FIG. 4 is a flowchart illustrating processing executed by a wirelesscommunication apparatus when a new network is constructed;

FIG. 5 is a flowchart illustrating communication determinationprocessing according to the first embodiment;

FIG. 6 is a diagram illustrating the structure of a wireless frame usedin data communication;

FIG. 7 is a diagram illustrating IP addresses of wireless communicationapparatuses, an access point and a wired terminal;

FIG. 8 is a flowchart illustrating processing executed on a side thatreceives a new-network communication request;

FIG. 9 is a diagram illustrating a communication sequence betweenwireless communication apparatuses via an access point;

FIG. 10 is a flowchart illustrating communication determinationprocessing according to another method;

FIG. 11 is a diagram illustrating an example of results of networktopology map search processing;

FIG. 12 is a diagram illustrating an example of the configuration of anetwork system according to a second embodiment of the presentinvention;

FIG. 13 is a flowchart illustrating communication determinationprocessing according to the second embodiment;

FIG. 14 is a diagram illustrating IP addresses and MAC addresses ofwireless communication apparatuses, access points and a wirelessterminal;

FIG. 15 is a diagram illustrating an example of construction of a newnetwork in the first embodiment; and

FIG. 16 is a diagram useful in describing a problem that arises with aconventional network system.

BEST MODE FOR CARRYING OUT THE INVENTION

Preferred embodiments of the present invention will now be described indetail with reference to the drawings.

First Embodiment

FIG. 1 is a diagram illustrating an example of the configuration of anetwork system according to a first embodiment of the present invention.The network includes an IEEE 802.11-compliant wireless LAN 106 composedof wireless communication apparatuses 101, 103 and access point 105, andwired LAN 108 to which the access point 105 and wired terminal 107 areconnected. The wireless communication apparatus 101 is furnished with acommunication function that relies upon the wireless LAN 106 and has, asoperating mode 102, an access point mode (referred to as an “AP mode”below) in which the apparatus operates as a base station and a stationmode (referred to as an “STA mode” below) in which the apparatusoperates as a terminal. Further, the wireless communication apparatus103 also is furnished with a communication function that relies upon thewireless LAN 106 and has an AP mode and STA mode as operating mode 104.

FIG. 2 is a diagram illustrating an example of the configuration of thewireless communication apparatus 101. It should be noted that theconfiguration of the wireless communication apparatus 103 also issimilar to that of the wireless communication apparatus 101. Here theinternal configuration of the apparatus will be described taking thewireless communication apparatus 101 as an example.

As shown in FIG. 2, the apparatus includes a controller 201 constitutedby a CPU and peripheral circuits (not shown) for controlling the overallwireless communication apparatus 101. An operating mode controller 202controls the operating mode, described later, and a power source unit203 is an external power supply or battery, etc. A RAM 204 includes aworking area, which is used when control is executed by the controller201, and various tables, etc. A ROM 205 stores control instructions(programs and control data) of the controller 201. An antenna 206 is forperforming wireless communication, and an antenna controller 207controls wireless communication by the antenna 206.

The wireless communication apparatus 101 further includes a display unit208 for displaying the operating state, etc., of the apparatus. Acontrol panel 209 is for allowing a user to issue operating instructionsto the wireless communication apparatus 101. A communication interface210 for communication other than wireless is a wired interface typifiedby USB or IEEE 1394, by way of example. An AP mode operating unit 211causes the wireless communication apparatus 101 to operate in the APmode, and an STA mode operating unit 212 causes the wirelesscommunication apparatus 101 to operate in the STA mode.

FIG. 3 is a diagram illustrating an example of the configuration of theaccess point 105.

As shown in FIG. 3, the access point 105 includes a controller 301constituted by a CPU and peripheral circuits (not shown) for controllingthe overall access point 105. A wireless communication processing unit302 controls communication by the wireless LAN 106. A RAM 303 includes aworking area, which is used when control is executed by the controller301, and various tables, etc. A ROM 304 stores control instructions(programs and control data) of the controller 301.

An antenna controller 305 controls wireless communication by an antenna306, which performs wireless communication. A display unit 307 is fordisplaying the operating state, etc., of the access point 105. A controlpanel 308 is for allowing a user to issue operating instructions to theaccess point 105, and a power source unit 309 is an external powersupply or battery, etc., for supplying power to the access point 105. Acommunication interface 310 is for wirelessly connecting the accesspoint 105 to the LAN to which the wired terminal 107 is connected.

In the arrangement described above, the access point 105 constructs thewireless LAN 106, and the wireless communication apparatuses 101, 103are connected to the access point 105 owing to actuation of the STA modeoperating unit 212. Further, the access point 105 has a router function.

Assume here that data communication of streaming data is being carriedout between the wireless communication apparatus 101 and wired terminal107 via the access point 105. Further, assume that the wirelesscommunication apparatus 103 is connected to the access point 105 but isnot performing data communication.

Reference will be made to FIGS. 4 to 11 to describe processing in whichthe wireless communication apparatus 101 constructs a new network andstarts communicating with the wireless communication apparatus 103 in acase where the wireless communication apparatus 103 has requested thewireless communication apparatus 101 to communicate under theseconditions.

FIG. 4 is a flowchart illustrating processing executed by a wirelesscommunication apparatus when a new network is constructed, FIG. 8 is aflowchart illustrating processing executed on a side that receives anew-network communication request, and FIG. 9 is a diagram illustratinga communication sequence between the wireless communication apparatus101 and wireless communication apparatus 103 via the access point 105.FIGS. 5 to 7 and FIGS. 10, 11 are diagrams useful in describingcommunication determination processing. The details will be describedlater.

In the first embodiment, assume that inadequate bandwidth is detectedwhen the wireless communication apparatus 101 starts communicating withthe wireless communication apparatus 103 via the access point 105. Owingto such detection, the wireless communication apparatus 101 determinesthat it is necessary to construct a new network (S401). It should benoted that the determination as to whether the construction of a newnetwork is required is not limited to detection of inadequate bandwidth.For example, the determination may be made in response to an instructionfrom the user.

Next, the wireless communication apparatus 101 executes communicationdetermination processing for determining whether it is communicatingwith an apparatus other than those connected to the existing networkconstructed by the access point 105 (S402).

An example of this communication determination processing will bedescribed with reference to FIGS. 5, 6 and 7. FIG. 5 is a flowchartillustrating communication determination processing according to thefirst embodiment, FIG. 6 is a diagram illustrating the structure of awireless frame used in data communication, and FIG. 7 is a diagramillustrating IP addresses of the wireless communication apparatuses 101,103, access point 105 and wired terminal 107.

As shown in FIG. 6, a MAC frame (data frame) 601 is composed of a MACheader and frame body. An IP packet 602 serves as the frame body. Afield 603, which is obtained by extracting the IP header portion of theIP packet, indicates the IP address of the transmission source and theIP address of the destination.

In conventional communication, it is possible to ascertain the datatransmission source and destination IP addresses from the field 603. InFIG. 7, what follows the “/” of each IP address indicates a subnet mask.Although an IPv4 address is used in the first embodiment, this does notimpose any limitation and the address may just as well be an IPv6address.

In FIG. 5, the wireless communication apparatus 101 determines whetheror not data communication is in progress (S501). If it is determinedthat data communication is in progress, then the wireless communicationapparatus 101 checks the data frame, which is currently involved incommunication, which it itself transmits. Accordingly, using thedestination IP address as well as the IP address and subnet address thathave been assigned to this wireless communication apparatus and areshown in FIG. 7, the wireless communication apparatus 101 determineswhether the destination IP address is the same segment (S502). As aresult of the determination, it is found that the IP address of thewired terminal 107 performing data communication has an IP address andsubnet mask different from those of the wireless communication apparatus101 and therefore it is determined that the destination IP address isnot the same segment. The wireless communication apparatus 101 thendetermines that communication with an apparatus other than apparatusesunder the control of the access point 105 exists (S503).

If in the above-described communication determination processing (S402)it is determined that data communication is being performed with anapparatus other than apparatuses under the control of the access point105 (“YES” in S403), then the wireless communication apparatus 101places itself in the AP mode and tries to construct a network byoperating in the AP mode. The wireless communication apparatus 101 thentransmits a new network communication request message M901 (S404)containing an indication that the wireless communication apparatus 101will switch to the AP mode. The transmission destination is the wirelesscommunication apparatus 103, which is the communication destination whenthe new network is constructed. The message may be transmitted to thewireless communication apparatus 103 by unicast or broadcast.

On the other hand, when the wireless communication apparatus 103receives the new network communication request message M901 (S801), itdetermines whether the communication over the new network is possible(S802). This determination may be made by the user or may be made inaccordance with a predetermined policy.

If it is determined that communication over the new network is possible,then, based upon the new network communication request message M901, thewireless communication apparatus 103 interprets that the wirelesscommunication apparatus 101 wishes to operate in the AP mode. Thewireless communication apparatus 103 then determines whether it ispermissible for this apparatus to operate in the STA mode in the newnetwork (S803). The result of the determination is that the wirelesscommunication apparatus 103 is not performing communication with anapparatus other than those under the control of the access point 105.Therefore, the wireless communication apparatus 103 sends the wirelesscommunication apparatus 101 a new network communication response messageM902 containing an indication that participation in the new network ispossible in the STA mode.

Further, if communication in the new network is not possible, then thewireless communication apparatus 103 sends the wireless communicationapparatus 101 a new network communication response message containing anindication that participation in the new network is not possible in theSTA mode (S807). Further, if it is determined in S803 that the wirelesscommunication apparatus 103 cannot operate in the STA mode, then thewireless communication apparatus 103 sends the wireless communicationapparatus 101 the new network communication response message containingan indication that it will operate in the AP mode (S806).

Next, upon receiving the new network communication response message M902(“YES” in S405), the wireless communication apparatus 101 interpretsfrom the message whether the new network is capable of being constructed(S406) and whether it itself may operate in the AP mode (S407).Accordingly, based upon the new network communication response messageM902, the wireless communication apparatus 101 determines that it itselfis capable of constructing the new network in the AP mode, and theoperating mode controller 202 actuates the AP mode operating unit 211(S408).

Thereafter, new network construction processing M903 is executed by thewireless communication apparatus 101 and wireless communicationapparatus 103 via the access point 105. The wireless communicationapparatus 101 operates in the AP mode and constructs the new wirelessnetwork, and the wireless communication apparatus 103 joins the newwireless network, whereby communication between these two apparatusesbecomes possible (see FIG. 15). When it communicates over the newwireless network, the wireless communication apparatus 101 actuates theSTA mode operating unit 212 and continues communication with the wiredterminal 107 via the access point 105.

It should be noted that the operating mode controller 202 may actuatethe STA mode operating unit 212 and AP mode operating unit 211simultaneously or may actuate them switchingly. Further, the operatingmode controller 202 may start up only the AP mode operating unit 211 andconnect to the access point 105 using a WDS.

Further, in a case where the wireless communication apparatus 101determines in S403 that it is not performing data communication with anapparatus other than those under the control of the access point 105,the wireless communication apparatus 101 executes mode decisionprocessing (S410). Similarly, mode decision processing is executed(S410) also in a case where the wireless communication apparatus 103receives at 5407 an indication of operation in the AP mode. By virtue ofmode decision processing, the wireless communication apparatus causesitself to operate in the AP mode or STA mode. The details of thisdecision processing will not be described here.

If a mode is decided as a result of this decision processing, newnetwork construction processing (S409) is executed. However, in a casewhere the mode cannot be decided, processing for constructing a newnetwork is terminated.

Further, in a case where the determination made in the communicationdetermination processing as to whether the wireless communicationapparatus 101 is currently communicating (S501) is that datacommunication is not in progress, similar processing is executed.

[Modification]

The communication determination processing described above illustratesone example. Another method will now be described. Reference will bemade to FIGS. 10 and 11 to describe a method in which use is made of anetwork topology map in communication determination processing todetermine whether data communication is being carried out with anapparatus other than those under the control of the access point 105.

FIG. 10 is a flowchart illustrating communication determinationprocessing according to another method. In FIG. 10, the wirelesscommunication apparatus 101 determines whether data communication is inprogress (S1001). If it is determined that data communication is inprogress, then the wireless communication apparatus 101 executesprocessing for searching for a network topology map (S1002). Here afunction for searching for a network topology map is implemented by aneighborhood search protocol such as LLTD (Link Layer TopologyDiscovery).

An example of results of network topology map search processing isillustrated in FIG. 11. It can be determined from these results that theapparatus presently performing data communication is the wired terminal107. This determination may be made using information concerning thedestination of data communication or it may be made based upon deviceinformation, etc.

Since the wired terminal 107 is not under the control of the accesspoint 105 (“NO” in S1003), it is determined that data communication withan apparatus other than those under the control of the access point 105exists (S1004).

In accordance with the first embodiment, it is possible to construct anew network with an arrangement in which communication with an existingnetwork is allowed to continue and bandwidth is not wasted in anenvironment where a plurality of wireless communication apparatuseshaving an AP mode and STA mode exist.

Second Embodiment

Next, a second embodiment according to the present invention will bedescribed in detail with reference to the drawings.

FIG. 12 is a diagram illustrating an example of the configuration of anetwork system according to the second embodiment. The network shown inFIG. 12 includes a wireless LAN 1203 composed of a wireless terminal1201 and an access point 1202, and a wireless LAN 1205 composed ofwireless communication apparatuses 101, 103 and an access point 1204. Itshould be noted that the wireless communication apparatuses 101, 103 areidentical with the wireless communication apparatuses 101, 103 shown inFIGS. 1 and 2 described in the first embodiment.

The access points 1202 and 1204 each have a bridge function and areconnected by a LAN 1206. The network constructed by the access points1202, 1204 is the same network (same subnet) as the network in the IPlayer. Further, the channels of the wireless LANs 1203, 1205 constructedby the access points 1202, 1204 are different.

In the arrangement described above, the wireless communicationapparatuses 101, 103, with their STA mode operating units 212 actuated,are both connected to the access point 1204. On the other hand thewireless terminal 1201 is connected to the access point 1202.

It is assumed here that data communication of streaming data is beingcarried out between the wireless communication apparatus 101 andwireless terminal 1201 via the access points 1204, 1202. Further, thewireless communication apparatus 103 is connected to the access point1204 but it is assumed that it is not performing data communication.

Processing will be described in which the wireless communicationapparatus 103 requests communication with the wireless communicationapparatus 101 via the access point 1204 and the wireless communicationapparatus 101 constructs a new network and starts communicating in amanner similar to that of the first embodiment.

In the second embodiment, assume that inadequate bandwidth is detectedwhen the wireless communication apparatus 101 starts communicating withthe wireless communication apparatus 103 via the access point 1204.Owing to such detection, the wireless communication apparatus 101determines that it is necessary to construct a new network (S401). Itshould be noted that the determination as to whether the construction ofa new network is required is not limited to detection of inadequatebandwidth. For example, the determination may be made in response to aninstruction from the user.

Next, the wireless communication apparatus 101 executes communicationdetermination processing for determining whether it is communicatingwith an apparatus other than those connected under the access point 1204(S402).

An example of this communication determination processing will bedescribed with reference to FIGS. 13 and 14. FIG. 13 is a flowchartillustrating communication determination processing according to thesecond embodiment, and FIG. 14 is a diagram illustrating IP addressesand MAC addresses of the wireless communication apparatuses 101, 103,access points 1204, 1202 and wireless terminal 1201.

First, as communication determination processing, the wirelesscommunication apparatus 101 determines whether it itself is currentlycommunicating (S1301). As a result, since the wireless communicationapparatus 101 is performing streaming data communication with thewireless terminal 1201 via the access points 1204, 1202, it isdetermined that data communication is in progress. The wirelesscommunication apparatus 101 thus determined to be performing datacommunication acquires the MAC addresses of terminals connected underthe access point 1204 (S1302). This acquisition of addresses may beperformed for both MAC addresses and IP addresses.

A method of acquiring addresses is to provide the access point 1204 witha function for gathering the MAC addresses of terminals connected to theaccess point 1204 and the MAC address of the access point 1204 anddeliver the addresses in the form of a list in response to a requestfrom the wireless communication apparatus 101.

Further, the wireless communication apparatus 101 may be set to apromiscuous mode and all packets of the wireless LAN 1205 constructed bythe access point 1204 may be received and the MAC addresses acquired.

Next, the wireless communication apparatus 101 compares the acquired MACaddresses and the MAC address of the destination with which datacommunication is currently being performed (S1303). As a result, it isdetermined that a MAC address identical with the MAC address of thedestination (wireless terminal 1201) currently performing communicationis not included among the acquired MAC addresses. That is, since it isascertained that the destination currently performing data communicationis that of an apparatus other than those under the control of the accesspoint 1204, it is determined that communication with an apparatus otherthan those under the control of the access point 1204 exists (S1304).

Processing executed by the wireless communication apparatuses 101 and103 from this point onward is identical with that of FIGS. 4 and 8described in the first embodiment and need not be described again.

As a result, the wireless communication apparatus 101 constructs a newnetwork in the AP mode and the wireless communication apparatus 103joins the new network, whereby communication between these twoapparatuses becomes possible. Further, the wireless communicationapparatus 101 is capable of continuing data communication with thewireless terminal 1201 via the access points 1204, 1202.

In accordance with the second embodiment, even with an identical subnetin the IP layer in terms of the network configuration, whether or notcommunication is being performed with an apparatus other than thoseconnected under an access point can be determined.

The communication determination processing described in the first andsecond embodiments may be implemented independently or implemented incombination.

Further, the processing executed by the wireless communicationapparatuses 101 and 103 in the first and second embodiments is notlimited to each apparatus and can be executed by both apparatusesmutually.

Thus, as described above, in an environment where a plurality ofwireless communication apparatuses having both an AP mode and an STAmode exist, communication with an existing network is allowed tocontinue and one of the wireless communication apparatuses constructs anew network in the AP mode. As a result, it is possible to construct anew network without wasting communication bandwidth.

The present invention may be applied to a system constituted by aplurality of devices (e.g., a host computer, interface, reader, printer,etc.) or to an apparatus comprising a single device (e.g., a copier orfacsimile machine, etc.).

Furthermore, it goes without saying that the object of the invention isattained also by supplying a recording medium storing the program codesof the software for performing the functions of the foregoingembodiments to a system or an apparatus, reading the program codes witha computer (e.g., a CPU or MPU) of the system or apparatus from therecording medium, and then executing the program codes.

In this case, the program codes per se read from the recording mediumimplement the novel functions of the embodiments and the recordingmedium storing the program codes constitutes the invention.

Examples of recording media that can be used for supplying the programcode are a flexible disk, hard disk, optical disk, magneto-optical disk,CD-ROM, CD-R, magnetic tape, non-volatile type memory card or ROM, etc.

Further, not only are the functions of the above-described embodimentsimplemented by executing program code that has been read by a computer;the following case is included as well: specifically, an operatingsystem or the like running on the computer executes some or all of theactual processing based upon the indications in the program codes, andthe functions of the above-described embodiments are implemented by thisprocessing.

Furthermore, it goes without saying that the following case also isincluded in the present invention: specifically, program code read froma recording medium is written to a memory provided on a functionexpansion board inserted into the computer or provided in a functionexpansion unit connected to the computer. Thereafter, a CPU or the likeprovided on the function expansion board or function expansion unitperforms some or all of actual processing based upon the indication inthe program codes, and the functions of the above embodiments areimplemented by this processing.

While the present invention has been described with reference toexemplary embodiments, it is to be understood that the invention is notlimited to the disclosed exemplary embodiments. The scope of thefollowing claims is to be accorded the broadest interpretation so as toencompass all such modifications and equivalent structures andfunctions.

This application claims the benefit of Japanese Patent Application No.2008-066734, filed Mar. 14, 2008, which is hereby incorporated byreference herein in its entirety.

1. A first communication apparatus comprising: a connection unit thatconnects to a first network constructed by a base station; a firstdetermination unit that determines whether or not communication is inprogress with a second communication apparatus other than apparatusunder the control of the base station, via the base station afterconnecting to the first network by the connection unit; a seconddetermination unit that determines whether to operate as a base stationof a second network or to operate as a station connected to the basestation of the second network; and a construction unit that operates asthe base station of the second network while maintaining the connectionwith the first network to construct the second network in a case whereit is determined to operate as the base station of the second network bythe second determination unit, wherein, when the first communicationapparatus starts communicating with a third communication apparatusconnected to the first network, it is determined to operate as the basestation of the second network by the second determination unit and theconstruction unit tries to construct the second network as the basestation while maintaining the connection with the first network, in acase where it is determined that communication is in progress with thesecond communication apparatus by the first determination unit.
 2. Theapparatus according to claim 1, wherein the first determination unitdetermines whether or not the first communication apparatus iscommunicating with the second communication apparatus based upon adestination address of data.
 3. The apparatus according to claim 1,wherein the first determination unit determines that the firstcommunication apparatus is communicating with the second communicationapparatus, if a destination address of data is not the same segment asthe first communication apparatus.
 4. The apparatus according to claim2, wherein the address is an IP address and whether the segment is thesame segment is decided by using a subnet mask.
 5. The apparatusaccording to claim 1, wherein the first determination unit determineswhether or not the first communication apparatus is communicating withthe second communication apparatus based upon network topology.
 6. Theapparatus according to claim 1, wherein said construction unit transmitsa message indicating that the first communication apparatus operates asa base station to the first network, and constructs the second networkas the base station in accordance with a response to the message.
 7. Amethod of constructing a network by a first communication apparatus,comprising: a connection step of connecting to a first networkconstructed by a base station; a first determination step of determiningwhether or not communication is in progress with a second communicationapparatus other than apparatus under the control of the base station,via the base station after connecting to the first network in theconnection step; a second determination step of determining whether tooperate as a base station of a second network or to operate as a stationconnected to the base station of the second network; and a constructionstep of operating as the base station of the second network whilemaintaining the connection with the first network to construct thesecond network in a case where it is determined to operate as the basestation of the second network in the second determination step, wherein,when the first communication apparatus starts communicating with a thirdcommunication apparatus connected to the first network, it is determinedto operate as the base station of the second network in the seconddetermination step and the first communication apparatus tries toconstruct the second network as the base station in the constructionstep while maintaining the connection with the first network, in a casewhere it is determined that communication is in progress with the secondcommunication apparatus in the first determination step.
 8. (canceled)9. A computer-readable recording medium on which a program for causing acomputer to execute a method of constructing a network by a firstcommunication apparatus set forth in claim 7 has been recorded.